import {
    Component,
    OnInit,
    HostBinding,
    trigger,
    transition,
    animate,
    style,
    state
} from '@angular/core';

@Component({
    selector: 'app-add',
    templateUrl: './add.component.html',
    styleUrls: ['./add.component.scss'],
    animations: [
        trigger('routeAnimation', [
            state('*',
                style({
                    opacity: 1,
                    transform: 'translateX(0)'
                })
            ),
            transition(':enter', [
                style({
                    opacity: 0,
                    transform: 'translateX(150px)'
                }),
                animate('0.35s ease-in-out')
            ])
        ])
    ]
})
export class BusinessAddComponent implements OnInit {
    @HostBinding('@routeAnimation') get routeAnimation() {
        return true;
    };

    @HostBinding('style.display') get display() {
        return 'block';
    };
    
    constructor() { }

    ngOnInit() {
    }
}
